#include <stdio.h>

void swap(int *, int *);

int main(){

    int a = 10, b = 20;
    printf("a = %d, b = %d", a, b);

    swap(&a, &b);

    printf("\nafter swap, a = %d, b = %d", a, b);

    return 0;
}

void swap(int *a, int *b){

    int t = *a;
    *a = *b;
    *b = t;

}